<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>prototype属性</title>
</head>
<body>
  <script>
    //function对象
    function Person()
    {}
    
    Person.prototype.address = "广州市";
    Person.prototype.running = function()
    {
        console.log("跑步");
    }
    Person.prototype.eating = function()
    {
        console.log("吃饭");
    }

    var p = new Person();
    console.log(p.address);
    console.log(Person.length);

  </script>
</body>
</html>